<template>
    <tabbar class="tabbar">
      <tabbar-item class="text" path="/home" activeColor="">
        <!-- <img slot="item-icon" src="~assets/img/tabbar/" alt=""> -->
        <div slot="item-text">首页</div>
      </tabbar-item>
      <tabbar-item class="text" path="/produce" activeColor="">
        <!-- <img slot="item-icon" src="~assets/img/tabbar/" alt=""> -->
        <div slot="item-text">公司简介</div>
      </tabbar-item>
      <tabbar-item class="text" path="/products" activeColor="">
        <!-- <img slot="item-icon" src="~assets/img/tabbar/" alt=""> -->
        <div slot="item-text">产品中心</div>
      </tabbar-item>
      <tabbar-item class="text" path="/service" activeColor="">
        <!-- <img slot="item-icon" src="~assets/img/tabbar/" alt=""> -->
        <div slot="item-text">服务支持</div>
      </tabbar-item>
      <tabbar-item class="text" path="/news" activeColor="">
        <!-- <img slot="item-icon" src="~assets/img/tabbar/" alt=""> -->
        <div slot="item-text">新闻动态</div>
      </tabbar-item>
      <tabbar-item class="text" path="/contact" activeColor="">
        <!-- <img slot="item-icon" src="~assets/img/tabbar/" alt=""> -->
        <div slot="item-text">联系我们</div>
      </tabbar-item>
      <tabbar-item class="pic">
        <div slot="item-icon">
          <img class="icon" src="~assets/img/er.svg" alt="" @mouseenter="active" @mouseleave="active">
          <div class="qrcode" v-show="!isShow">
            <img  src="~assets/img/qrcode.jpg" alt="">
          </div>
        </div>          
      </tabbar-item>
    </tabbar>
    
</template>

<script>
  import Tabbar from 'components/common/tabbar/Tabbar';
  import TabbarItem from 'components/common/tabbar/TabbarItem';

  export default {
    name: 'MainTabBar',
    components: {
      Tabbar,
      TabbarItem,
    },
    data() {
      return {
        isShow: true,
      }
    },
    methods: {
      active() {
        this.isShow = !this.isShow
      },
    }
  }
</script>

<style scoped>
  .tabbar {
    padding: 20px 300px;
  }
  .text div {
    padding: 15px 0 ;
    cursor: pointer;
    font-size: 16px;
  }
  .text div:hover {
    color:royalblue;
  }
  .pic {
    position: relative;
    top: 10px;
    cursor: pointer;
  }
  .icon {
    width: 24px;
    height: 24px;
    padding: 3px 0;
  }
  .qrcode {
    width: 80px;
    height: 80px;
    padding: 4px;
    background-color: #fff;
    border-radius: 3px;
  }
  .qrcode img {
    width: 100%;
  }
</style>